變數 Variables <<
Previous Next >> HW3
HTML Tutorial HTML教程
HTML Introduction HTML簡介
HTML is the standard markup language for creating Web pages.
HTML是用於創建網頁的標準標記語言。
What is HTML? 什麼是HTML?
- HTML stands for Hyper Text Markup Language
- HTML代表超文本標記語言
- HTML is the standard markup language for creating Web pages
- HTML是用於創建網頁的標準標記語言
- HTML describes the structure of a Web page
- HTML描述了網頁的結構
- HTML consists of a series of elements
- HTML由一系列元素組成
- HTML elements tell the browser how to display the content
- HTML元素告訴瀏覽器如何顯示內容
- HTML elements label pieces of content such as "this is a heading", "this is a paragraph", "this is a link", etc.
- HTML元素標記內容的內容,例如“這是標題”,“這是段落”,“這是鏈接”等。
A Simple HTML Document 一個簡單的HTML文檔
Example 範例
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>
Example Explained 示例說明
- The
<!DOCTYPE html>
declaration defines that this document is an HTML5 document
- <!DOCTYPE html>聲明定義此文檔為HTML5文檔
- The
<html>
element is the root element of an HTML page
- <html>元素是HTML頁面的根元素
- The
<head>
element contains meta information about the HTML page
- <head>元素包含有關HTML頁面的元信息
- The
<title>
element specifies a title for the HTML page (which is shown in the browser's title bar or in the page's tab)
- <title>元素指定HTML頁面的標題(顯示在瀏覽器的標題欄中或頁面的選項卡中)
- The
<body>
element defines the document's body, and is a container for all the visible contents, such as headings, paragraphs, images, hyperlinks, tables, lists, etc.
- <body>元素定義文檔的正文,並且是所有可見內容的容器,例如標題,段落,圖像,超鏈接,表格,列表等。
- The
<h1>
element defines a large heading
- <h1>元素定義一個大標題
- The
<p>
element defines a paragraph
- <p>元素定義一個段落
What is an HTML Element? 什麼是HTML元素?
An HTML element is defined by a start tag, some content, and an end tag:
HTML元素由開始標籤,一些內容和結束標籤定義:
<tagname>Content goes here...</tagname>
The HTML element is everything from the start tag to the end tag:
HTML元素包括從開始標記到結束標記的所有內容:
<h1>My First Heading</h1>
<p>My first paragraph.</p>
Note: Some HTML elements have no content (like the <br> element). These elements are called empty elements. Empty elements do not have an end tag!
注意:某些HTML元素沒有內容(例如<br>元素)。這些元素稱為空元素。空元素沒有結束標籤!
Web Browsers 網頁瀏覽器
The purpose of a web browser (Chrome, Edge, Firefox, Safari) is to read HTML documents and display them correctly.
網絡瀏覽器(Chrome,Edge,Firefox,Safari)的目的是讀取HTML文檔並正確顯示它們。
A browser does not display the HTML tags, but uses them to determine how to display the document:
瀏覽器不顯示HTML標記,而是使用它們來確定如何顯示文檔:

HTML Page Structure HTML頁面結構
Below is a visualization of an HTML page structure:
下面是HTML頁面結構的可視化:

Note: The content inside the <body> section (the white area above) will be displayed in a browser. The content inside the <title> element will be shown in the browser's title bar or in the page's tab.
注意:<body>部分(上面的白色區域)內的內容將在瀏覽器中顯示。 <title>元素內的內容將顯示在瀏覽器的標題欄中或頁面的選項卡中。
HTML History HTML歷史
Since the early days of the World Wide Web, there have been many versions of HTML:
自萬維網問世以來,已經有許多版本的HTML:

This tutorial follows the latest HTML5 standard.
本教程遵循最新的HTML5標準。
變數 Variables <<
Previous Next >> HW3